#include "BaseType.h"
#include "TraceDebug.h"
#include "Setting.h"

void TestSetting()
{
	Setting* pSetting = new Setting();
	pSetting->open("app.cfg");
	std::string value;
	value=pSetting->read("version");
	TRACE_DEBUG("version=%s\n",value.c_str());
	value=pSetting->read("serverip");
	TRACE_DEBUG("serverip=%s\n",value.c_str());
	value=pSetting->read("serverport");
	TRACE_DEBUG("serverport=%s\n",value.c_str());

	pSetting->write("time","0000");
	value=pSetting->read("time");
	TRACE_DEBUG("0time=%s\n",value.c_str());

	pSetting->write("time","1111");
	value=pSetting->read("time");
	TRACE_DEBUG("1time=%s\n",value.c_str());

	pSetting->close();
	delete pSetting;
	pSetting = NULL;
}